import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class PlayerCountLabel extends StatelessWidget {
  final int count;
  const PlayerCountLabel({Key? key, required this.count}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return FittedBox(
      fit: BoxFit.scaleDown,
      alignment: Alignment.centerLeft,
      child: DecoratedBox(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(4),
          color: const Color.fromRGBO(112, 128, 145, 0.6),
        ),
        child: Padding(
          padding: EdgeInsets.symmetric(
            vertical: 3.0.h,
            horizontal: 5.w,
          ),
          child: Row(
            children: [
              Icon(
                Icons.people,
                size: 14.sp,
              ),
              SizedBox(
                width: 4.w,
              ),
              Text(
                count.toString(),
                style: TextStyle(
                  fontSize: 8.sp,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
